import request from '@/utils/request'
import { apiVersion } from '@/config'

// 全部S3配置 
export function getAllAssetS3(data) {
  return request({
    url: `/admin/${apiVersion}/asset/s3/all`,
    method: 'get',
    data
  })
}
export function getAssetS3s(data) {
  return request({
    url: `/admin/${apiVersion}/asset/s3`,
    method: 'get',
    data
  })
}
/**
 * 添加S3
 * @param {} s3
 */
export function addAssetS3(data) {
  return request({
    url: `/admin/${apiVersion}/asset/s3`,
    method: 'post',
    data: data
  })
}
/**
 * 删除S3
 * @param {} data 
 */
export function delAssetS3(data) {
  return request({
    url: `/admin/${apiVersion}/asset/s3/${data.id}`,
    method: 'delete',
    data: data
  })
}
/**
 * 更新S3
 * @param {} data 
 */
export function putAssetS3(data) {
  return request({
    url: `/admin/${apiVersion}/asset/s3`,
    method: 'put',
    data: data
  })
}
/**
 * 取得S3详情
 * @param {*} data 
 */
export function getAssetS3Detail(id) {
  return request({
    url: `/admin/${apiVersion}/asset/s3/${id}`,
    noLoadding: true,
    method: 'get',
  })
}
